// 定义货币列表数据
const currencyList = [
    {
        name: '人民币',
        symbol: '¥',
        code: 'CNY',
        country: '中国'
    },
    {
        name: '卢布',
        symbol: '₽',
        code: 'RUB',
        country: '俄罗斯'
    },
    {
        name: '坚戈',
        symbol: '₸',
        code: 'KZT',
        country: '哈萨克斯坦'
    },
    {
        name: '白俄罗斯卢布',
        symbol: 'Br',
        code: 'BYN',
        country: '白俄罗斯'
    },
    {
        name: '索姆',
        symbol: 'сом',
        code: 'KGS',
        country: '吉尔吉斯斯坦'
    },
    {
        name: '苏姆',
        symbol: 'сўм',
        code: 'UZS',
        country: '乌兹别克斯坦'
    },
    {
        name: '马纳特',
        symbol: 'T',
        code: 'TMT',
        country: '土库曼斯坦'
    },
    {
        name: '格里夫纳',
        symbol: '₴',
        code: 'UAH',
        country: '乌克兰'
    },
    {
        name: '索莫尼',
        symbol: 'SM',
        code: 'TJS',
        country: '塔吉克斯坦'
    }
];

/**
 * 根据货币代码获取对应的货币符号
 * @param {string} code - 货币代码
 * @returns {string} 货币符号
 */
const getSymboleByCode = (code) => {
    const currency = currencyList.find(item => item.code === code);
    return currency?.symbol || null;
};


export default {
    currencyList,
    getSymboleByCode
}
